import requests
import json
# 高级
# url = "http://httpbin.org/get"
# res = requests.get(url)
# data = res.json()
# print(data)
# print(type(data),data['headers']['User-Agent'])

#中级text
# url = "https://www.baidu.com/robots.txt"
# res = requests.get(url)
# data = res.text.strip("utf-8")
# print(type(data),data)

#低级content
url = "https://q8.itc.cn/q_70/images03/20241030/7e4e379bf5b84b6c9fb4a9fec3102d5d.jpeg"
res = requests.get(url)
with open("content.jpeg","wb") as f:
    f.write(res.content)